projects
/
gpsbabel.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
94bb42d
)
Add error if inputting from a style file without IFIELDs.
author
robertl
<robertl>
Thu, 19 Jul 2007 16:39:59 +0000
(16:39 +0000)
committer
robertl
<robertl>
Thu, 19 Jul 2007 16:39:59 +0000
(16:39 +0000)
csv_util.c
patch
|
blob
|
history
diff --git
a/csv_util.c
b/csv_util.c
index a5d52ffe7f52f22b8a1439781f2b1e2b0e940a27..81b833b76a6c54ec1ff7cc233cc78613cb55d60d 100644
(file)
--- a/
csv_util.c
+++ b/
csv_util.c
@@
-1091,6
+1091,10
@@
xcsv_data_read(void)
s = buff;
s = csv_lineparse(s, xcsv_file.field_delimiter, "", linecount);
+ if (QUEUE_EMPTY(&xcsv_file.ifield)) {
+ fatal(MYNAME ": attempt to read, but style '%s' has no IFIELDs in it.\n", xcsv_file.description? xcsv_file.description : "unknown");
+ }
+
/* reset the ifield queue */
elem = QUEUE_FIRST(&xcsv_file.ifield);